﻿<UserControl x:Class="Showroom.WPF.Views.Extensibility"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:fl="clr-namespace:SStuff.FlowControls;assembly=SStuff.FlowControls" xmlns:vm="clr-namespace:Showroom.ViewModels" mc:Ignorable="d" 
             d:DesignHeight="600" d:DesignWidth="800">
    <UserControl.DataContext>
        <vm:InCoverFlowContentControlSampleData />
    </UserControl.DataContext>
    <UserControl.Resources>
        <Style TargetType="fl:FlowItem3D" x:Key="empty3D">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="fl:FlowItem3D">
                        <Grid>
                            <Rectangle Fill="Transparent" IsHitTestVisible="False" />
                            <ContentPresenter Margin="20"/>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <DataTemplate x:Key="itemTemplate">
            <fl:InFlowContentControl Content="{Binding ColorName}" Background="{Binding Brush}" HeadingBackground="{Binding HeaderBrush}" Width="150" Height="150" />

        </DataTemplate>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot" >
        <TextBlock TextWrapping="Wrap" Text="The following FlowItemsControl3D is a normal FlowItemsControl3D with a custom LayoutAlgorithm"  />
        <fl:FlowItemsControl3D ItemsSource="{Binding Items}" ItemTemplate="{StaticResource itemTemplate}" ItemContainerStyle="{StaticResource empty3D}" >
            <fl:FlowItemsControl3D.LayoutAlgorithm>
                <vm:SimpleCarouselAlgorithm />
            </fl:FlowItemsControl3D.LayoutAlgorithm>
        </fl:FlowItemsControl3D>
    </Grid>
</UserControl>
